package hgz.stu.review.thread;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public class ThreadMainTest {

	public static void main(String[] args) {
		
		Map<String,String> map = new HashMap<String,String>();
		map.put("1", "one");
		map.put("2", "two");
		map.put("3", "3rd");
		
		Set<String> keys = map.keySet();
		for(String key:keys) {
			System.out.println(key + "="+ map.get(key));
		}
		
		
		
		
		
		Iterator iter= map.entrySet().iterator();
		
		while(iter.hasNext()) {
			Map.Entry<String, String> entry = (Entry<String, String>) iter.next();
			System.out.println(entry.getKey() + "="+ entry.getValue());
		}
		;
	}

}
